package wibrst.utils {
	import flash.display.DisplayObject;
	import flash.geom.ColorTransform;
	/**
	 * ...
	 * @author wibrst@qq.com
	 */
	public class ColorUtil{
		
		static public function setVisualClr( v:DisplayObject, clr:Number ):void {
			var ct:ColorTransform = new ColorTransform(1, 1, 1, 1,
				clr << 16 & 0xff, clr << 8 & 0xff, clr & 0xff );
			v.transform.colorTransform = ct;
		}
		
		static public function getRdmClr( ):uint {
			var clr:uint = uint( Math.random() * 256 ) << 16 
						| int( Math.random() * 256 ) << 8 
						| int( Math.random() * 256 );
			trace( "ColorUtil. getRdmClr: #" + clr.toString( 16 ).toLocaleUpperCase() );
			return clr;
		}
		
	}

}